package design.onekey.service;

import com.baomidou.mybatisplus.extension.service.IService;
import design.onekey.base.BaseEntity;
import design.onekey.base.PageEntity;
import design.onekey.model.dto.UserInfoDto;
import design.onekey.model.SysCodeValue;

import java.util.List;
import java.util.Map;

/**
* @Description: SysCodeValue服务接口
* @author
* @date 2020-06-05 04:02:24
* @version V1.0
 */
public interface ISysCodeValueService extends IService<SysCodeValue>,GenericService<SysCodeValue>{

	/**
	* @Title: tablePagingQuery
	* @Description: 表格分页查询
	* @param @param model
	* @return BaseEntity
	* @throws
	*/
	PageEntity tablePagingQuery(SysCodeValue model);

	/**
	*<p>Title: getDetail</p>
	*<p>Description: 获取详情</p>
	* @author blcloak
	* @param id
	* @return
	*/
	BaseEntity getDetail(Long id);

	/**
	*<p>Title: insert</p>
	*<p>Description: 新增数据</p>
	* @author blcloak
	* @param model
	* @return
	*/
	BaseEntity insert(SysCodeValue model, UserInfoDto userInfoDto);

	/**
	*<p>Title: update</p>
	*<p>Description: 更新数据</p>
	* @author blcloak
	* @param model
	*/
	BaseEntity update(SysCodeValue model, UserInfoDto userInfoDto);

	/**
	*<p>Title: delete</p>
	*<p>Description: 单条删除数据</p>
	* @author blcloak
	* @param model
	* @return
	*/
	BaseEntity delete(Long id);

	/**
	*<p>Title: deleteBatch</p>
	*<p>Description: 批量删除数据</p>
	* @author blcloak
	* @param list
	* @return
	*/
	BaseEntity deleteBatch(List<Long> ids);

	/**
	 * @Method selectValByType
	 * @Author zhangcheng
	 * @Version  1.0
	 * @Description 根据codeType查询codeVal
	 * @Return
	 * @Exception
	 * @Date 2020-6-17 16:05
	 */
	List<SysCodeValue> selectValByType(String codeType);

	/**
	 * @Method getValueName
	 * @Author zhangcheng
	 * @Version  1.0
	 * @Description 根据type和value查询valueName
	 * @Return
	 * @Exception
	 * @Date 2020-6-17 16:13
	 */
	 String getValueName(String type, String value);

	 /**
	  * @Method getAllVal
	  * @Author zhangcheng
	  * @Version  1.0
	  * @Description 查询id:valueName格式 全部
	  * @Return
	  * @Exception
	  * @Date 2020-6-17 16:26
	  */
	 Map<String, String> getAllVal();

	 /**
	 * @Title: getValuesName
	 * @Description: 获取多个值的name
	 * @param type
	 * @param values
	 * @return
	 * @author blcloak
	 * @date 2020-08-19 05:53:33
	 */
	List<String> getValuesName(String type, List<String> values);
 }
